<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The Mutex class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="pthreads.modifiers.html">Modifiers</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mutex.create.html">Mutex::create</a></div>
 <div class="up"><a href="book.pthreads.html">pthreads</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.mutex" class="reference">

 <h1 class="title">The Mutex class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL pthreads &gt;= 0.34)</p>


  <div class="section" id="mutex.intro">
   <h2 class="title">简介</h2>
   <p class="para">
  The static methods contained in the Mutex class provide direct access to Posix Mutex functionality.
   </p>
  </div>


  <div class="section" id="mutex.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">Mutex</strong>
     </span>
     {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
  <span class="modifier">final</span> 
  <span class="modifier">public</span> 
  <span class="modifier">static</span> 
  <span class="type">long</span>
  <span class="methodname"><a href="mutex.create.html" class="methodname">create</a></span>
   ([ <span class="methodparam">
 <span class="type">boolean</span>
  <code class="parameter">$lock</code>
  </span>
  ] )</div>
<div class="methodsynopsis dc-description">
 <span class="modifier">final</span> 
 <span class="modifier">public</span> 
 <span class="modifier">static</span> 
 <span class="type">boolean</span>
 <span class="methodname"><a href="mutex.destroy.html" class="methodname">destroy</a></span>
  ( <span class="methodparam">
  <span class="type"><span class="type long">long</span></span>
   <code class="parameter">$mutex</code>
 </span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">final</span> 
   <span class="modifier">public</span> 
   <span class="modifier">static</span> 
   <span class="type">boolean</span>
   <span class="methodname"><a href="mutex.lock.html" class="methodname">lock</a></span>
    ( <span class="methodparam">
 <span class="type"><span class="type long">long</span></span>
  <code class="parameter">$mutex</code>
  </span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">final</span>
   <span class="modifier">public</span>
   <span class="modifier">static</span>
   <span class="type">boolean</span>
   <span class="methodname"><a href="mutex.trylock.html" class="methodname">trylock</a></span>
    ( <span class="methodparam">
 <span class="type"><span class="type long">long</span></span>
  <code class="parameter">$mutex</code>
  </span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">final</span> 
   <span class="modifier">public</span>
   <span class="modifier">static</span>
   <span class="type">boolean</span>
   <span class="methodname"><a href="mutex.unlock.html" class="methodname">unlock</a></span>
    ( <span class="methodparam">
 <span class="type"><span class="type long">long</span></span>
  <code class="parameter">$mutex</code>
 </span>
   [, <span class="methodparam">
 <span class="type">boolean</span>
  <code class="parameter">$destroy</code>
  </span>
  ] )</div>

   }</div>


  </div>

 </div>

 




































<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="mutex.create.html">Mutex::create</a> — Create a Mutex</li><li><a href="mutex.destroy.html">Mutex::destroy</a> — Destroy Mutex</li><li><a href="mutex.lock.html">Mutex::lock</a> — Acquire Mutex</li><li><a href="mutex.trylock.html">Mutex::trylock</a> — Attempt to Acquire Mutex</li><li><a href="mutex.unlock.html">Mutex::unlock</a> — Release Mutex</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="pthreads.modifiers.html">Modifiers</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mutex.create.html">Mutex::create</a></div>
 <div class="up"><a href="book.pthreads.html">pthreads</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
